package com.geh.learn.thread;

/**
 * Created by gehui on 2017/2/23.
 */
public class RunnableTest {
    public static void main(String[] args) {

        //Before Java 8
        Runnable r1 = new Runnable() {
            public void run() {
                System.out.println("This should be run in another thread");
            }
        };
        r1.run();

        //Java 8
        Runnable r2 = () -> System.out.println("This should be run in another thread");
        r2.run();

    }
}
